package com.ltf.service;

import com.ltf.dao.TermDao;
import com.ltf.entity.Term;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class TermServiceImpl implements TermService {
    @Autowired
    TermDao termDao;

    public TermServiceImpl(){}

    @Override
    public List<Term> findAll() {
        return this.termDao.findAll();
    }

    @Override
    public Term findByState() {
        return this.termDao.findByState();
    }

    @Override
    public Term findById(Integer id) {
        return this.termDao.findById(id);
    }

    @Override
    public int update(Term term) {
        return this.termDao.update(term);
    }

    @Override
    public int add(Term term) {
        return this.termDao.add(term);
    }

    @Override
    public int del(Integer id) {
        return this.termDao.del(id);
    }
}
